package com.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName: DemoController
 * @Description:
 * @date: 2021/11/18 14:02
 */

@Controller
@RequestMapping("/service")
public class DemoController {

    @Value("${profile.oversea}")
    private String profileOversea;

    @RequestMapping(value ="/{id}",method = RequestMethod.GET)
    public @ResponseBody String hello(@PathVariable("id") String id){
        System.out.println(id);
        return profileOversea+"hello springcloud"+id;
    }
}
